package nl.haemers.events 
{
	import fl.motion.Keyframe;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Jonathan Haemers
	 * @company $(DefaultCompany)
	 */
	public class PopupEvent extends Event 
	{
		public static const POPUP_CANCEL					:String = "popupCancel";
		public static const POPUP_CONFIRM					:String = "popupConfirm";
		public static const HIDE_COMPLETE					:String = "hideComplete";
		
		public static const CALL_POPUP						:String = "callPopup";
		
		private var _popupType								:String;
		private var _name									:String;
		private var _title									:String;
		private var _bodyText								:String;
		
		public function PopupEvent(type:String, popupType:String="", name:String="", title:String="", bodyText:String="",  bubbles:Boolean=false, cancelable:Boolean=false) 
		{
			super(type, bubbles, cancelable);
			
			_popupType = popupType;
			_name = name;
			_title = title;
			_bodyText = bodyText;
		}
		
		public override function clone():Event 
		{ 
			return new PopupEvent(type, _popupType, _name, _title, _bodyText, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("PopupEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
		/** Getters & Setters **/
		public function get popupType() : String
		{ 
			return _popupType; 
		}
		public function get name() : String
		{ 
			return _name;
		}
		public function get title() : String
		{ 
			return _title; 
		}
		public function get bodyText() : String
		{ 
			return _bodyText; 
		}
	}
	
}